#include "../include/FileClass.h"
#include <cstdlib>
#include <cstdio>
using namespace std;

FileClass::FileClass(const char* fname,const char* mode){
    if((f=fopen(fname,mode))==0){
        throw FileClassError("error opening file");
    }
}

FileClass::~FileClass(){
    fclose(f);
}

FILE* FileClass::fp(){
    return f;
}